The hash owns a ref to the cursor
authorPaolo Borelli <pborelli@gnome.org>
Sat, 10 Jul 2010 16:48:12 +0000 (18:48 +0200)
committerPaolo Borelli <pborelli@gnome.org>
Sat, 10 Jul 2010 16:49:21 +0000 (18:49 +0200)
gdk/gdkwindow.c

index dff74a16aaf398269f5ba9f232c575dc18dd7b9f..46841be741e51b3bf71274cffb07487fc2fbdeb6 100644 (file)
@@ -8477,7 +8477,7 @@ gdk_window_set_device_cursor (GdkWindow *window,
   if (!cursor)
     g_hash_table_remove (private->device_cursor, device);
   else
-    g_hash_table_replace (private->device_cursor, device, cursor);
+    g_hash_table_replace (private->device_cursor, device, gdk_cursor_ref (cursor));
 
   if (!GDK_WINDOW_DESTROYED (window))
     {